bpf: Restrict kernel image access functions when the kernel is locked down
authorLee, Chun-Yi <jlee@suse.com>
Wed, 5 Apr 2017 16:40:31 +0000 (17:40 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 19 Sep 2017 00:59:17 +0000 (01:59 +0100)
commit1d002d87eeee6dddeefdb7eeaa4216778a6d1253
tree2af5097011b9b963601e6981a54ef308361f1583
parent453b61acf466dfe3951e3a06930c172760245123
bpf: Restrict kernel image access functions when the kernel is locked down

There are some bpf functions can be used to read kernel memory:
bpf_probe_read, bpf_probe_write_user and bpf_trace_printk.  These allow
private keys in kernel memory (e.g. the hibernation image signing key) to
be read by an eBPF program.  Prohibit those functions when the kernel is
locked down.

Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Gbp-Pq: Topic features/all/lockdown
Gbp-Pq: Name 0057-bpf-Restrict-kernel-image-access-functions-when-the-.patch
kernel/trace/bpf_trace.c